Method and arrangement for enhancing search through trellis

ABSTRACT

The invention relates to a method and arrangement for enhancing a search through a trellis in a detector ( 220 ) that is arranged at each stage of the trellis to select a certain set of state indexes of the stage for continuation. The detector ( 220 ) is arranged, when each stage of the trellis is calculated, to define more than one unequal threshold value for the values of the state indexes, each threshold value defining one state index group, to calculate for each state index a path metric, to arrange the calculated state indexes into different groups by comparing the path metric value of the state index with the threshold values. Further the detector selects from the groups a certain number of state indexes for continuation in such a manner that starting from the group comprising the highest state indexes, entire groups are selected for continuation until the next entire group does not fit in. From this group only randomly selected state indexes are selected until a given number is collected.

FIELD OF THE INVENTION

The invention relates to a method and arrangement for enhancing a searchthrough a trellis, in which at each stage of the trellis a certain setof state indexes of the stage are selected for continuation.

BACKGROUND

The channel used in telecommunications systems often causes interferenceto data transmission Interference occurs in all kinds of systems, butespecially in wireless telecommunications systems, the transmission pathattenuates and distorts in many different ways the signal beingtransmitted. The multipath propagation of the signal, different fadesand reflections, and other signals being transmitted on the sametransmission path typically cause interference on the transmission path.

To reduce the impact of the interference, several coding methods havebeen developed to protect signals from interference and to endeavour toeliminate errors caused by interference in signals. Convolutional codingis a much-used coding method. In convolutional coding, the signal to betransmitted that is made up of symbols is coded into code words that arebased on the convolution of the symbols to be transmitted either withthemselves or with another signal. The coding ratio and generatorpolynomials define the convolutional code. The coding ratio (kin) refersto the number (n) of the produced coded symbols in relation to thenumber (k) of the symbols to be coded. The coder is often a shiftregister. The constraint length (K) of a code often refers to the lengthof the shift register. The coder can be considered a state machinehaving 2^(K-1) states.

A receiver decodes the coded signal that propagated through the channel.A convolutional code is usually decoded using a trellis whose nodesdescribe the states of the encoder used in coding the signal, and thepaths between the nodes belonging to different stages of the trellisdescribe the allowed state transitions. A decoder tries to find out theconsecutive states of the coder, i.e. the transitions from one state toanother. To find out the transitions, the decoder calculates metrics, ofwhich there are two types: path metrics (or state metrics) and branchmetrics. Path metrics represent the probability of the set of symbols inthe received signal leading to the state described by the node inquestion. Branch metrics represent the probabilities of differenttransitions.

A convolutional code is usually decoded by means of the Viterbialgorithm. The Viterbi algorithm is a computationally demanding task. Ageneral problem with the Viterbi algorithm is that when the constraintlength is long (e.g. 9, as in WCDMA of the UMTS system), the Viterbialgorithm must search through 2⁽⁹⁻¹⁾, i.e. 256, states to decode onebit. Efficient signal processing algorithms are still being searched forwireless telecommunications systems in particular, in which the aim isto minimize the size and power consumption of subscriber terminals. Acomputationally efficient algorithm for speech or data decoding is the Malgorithm that is a search algorithm simplified from the Viterbialgorithm. Using the M algorithm makes it possible to reduce the numberof searched states, because only M best paths are selected forcontinuation in the trellis stages instead of all paths. When a suitablevalue is selected for M, the performance of the decoder does not,however, become significantly poorer. For instance, in theabove-mentioned system, M can obtain the value 128, i.e. half of thepossible paths are selected for continuation at each stage.

One problem with the use of the M algorithm is the selection of pathsfor continuation amongst all paths. Typically, the sorting of n elementsrequires n²/2 comparison operations, and this is a computationallydemanding task. Let us assume that the decoding of one bit by DSP(digital signal processing) in WCDMA requires approximately 500 clockcycles when a full search algorithm is used. If the M algorithm is used,the number of states to be searched is smaller but correspondingly,sorting increases the complexity. When sorting 16 elements, 128comparison operations are required. Thus using the M algorithm with thebest 16 paths leads to almost the same complexity as a full searchalgorithm. If a 256-state code is used, a full sort requires n²/2, i.e.32768 comparisons. A full search is too complex an operation toimplement by the traditional methods.

One known solution for implementing the M algorithm is disclosed inpublication S. J. Simmons: A Nonsorting VLSI structure for implementingthe (M,L) algorithm, IEEE Journal on Selected Areas in Communications,Vol. 6, No. 3, April 1988, pages 538 to 546. The disclosed solution doesnot perform the actual sorting, but examines several different pathmetrics at the same time, starting from the most significant bit. Whilethe different paths are examined, decisions are made on keeping orrejecting the routes. If the examined route is opposite to an alreadyselected route, it is rejected. However, the solution disclosed in thepublication works poorly in situations where the trellis is large, as inWCDMA of the UMTS system, for instance.

The trellis structure is used not only in the decoding of convolutionalcodes, but also in several other applications, such as channelequalization. The same above-mentioned problems also apply to thesesolutions, when the size of the trellis increases.

Thus, to minimize the size and power consumption of devices, moreefficient methods than before are needed for searching through atrellis, methods that are fast and whose implementation as ASICstructures does not require much space.

BRIEF DESCRIPTION OF THE INVENTION

It is an object of the invention to provide a method and an apparatusimplementing the method in such a manner that a restricted trellissearch is possible to perform more advantageously than before. This isachieved by a method for enhancing a search through a trellis, in whichat each stage of the trellis a certain set of state indexes of the stageare selected for continuation. The method of the invention comprisesdefining, at each stage of the trellis, more than one unequal thresholdvalue for the values of the state indexes, each threshold value definingone state index group, calculating for each state index a path metric,arranging the calculated state indexes into different state index groupsby comparing the path metric value of the state index with the thresholdvalues, selecting state indexes for continuation from the groups in sucha manner that starting from the group comprising the highest stateindexes, state indexes are selected from the group in a random orderuntil all indexes of the group have been selected, then continuing toselect the state indexes from the next group, and repeating this until acertain number of state indexes have been selected.

The invention also relates to an arrangement for enhancing a searchthrough a trellis in a detector that is arranged at each stage of thetrellis to select a certain set of state indexes of the stage forcontinuation. In the arrangement, the detector is arranged when eachstage of the trellis is calculated to define more than one unequalthreshold value for the values of the state indexes, each thresholdvalue defining one state index group, to calculate for each state indexa path metric, to arrange the calculated state indexes into differentgroups by comparing the path metric value of the state index with thethreshold values, to select from the groups a certain number of stateindexes for continuation in such a manner that starting from the groupcomprising the highest state indexes, entire groups are selected forcontinuation until the next entire group does not fit in, and from thisgroup only randomly selected state indexes are selected until a givennumber is collected.

Preferred embodiments of the invention are described in the dependentclaims.

The method and arrangement of the invention thus provide severaladvantages. Implementing preferred solutions of the invention in areceiver is simple. The M algorithm has not been utilized much inpractice because of the calculations it requires. By means of thepresent solution, the M algorithm can be efficiently utilized. Becausethe solution examines fewer states than the Viterbi algorithm, lessmemory is required for calculating the paths. This results in savings inequipment costs. Further, the power consumption of the receiverdecreases when using the solution, because there is less calculation andless memory space is needed. However, the solution provides a sufficientperformance that in practice is equal to that of the earlier methods.

One implementation alternative uses modulo arithmetic to implement thecalculation required by the invention. For this reason, no scaling isnecessary for the calculated metrics. This simplifies the calculationand the implementation of the solution.

Especially in connection with high data rates, the present solutionprovides a significant benefit, because in such cases, the size of thetrellis is typically large. Large trellises also need to be used forinstance when several antennas, complex modulation methods and strongcodes are used in transmission and reception. Decoding large trellisesincreases the amount of required calculation, and in such a situation,the present solution helps curb the amount of calculation.

The solutions of the preferred embodiments can be utilized in allapplications that use a trellis. In addition to the above-mentioneddecoding of convolutional coding, such applications include the decodingof other types of codes, equalization, multiuser decoding and speechrecognition.

LIST OF FIGURES

The invention will now be described in more detail by means of thepreferred embodiments, with reference to the attached drawings, in which

FIG. 1 shows an example of a telecommunications system, to which thepreferred embodiments can be applied,

FIG. 2 shows an example of a transmitter and receiver,

FIG. 3 illustrates a trellis,

FIGS. 4A and 4B are flow charts illustrating an example of a preferredmethod,

FIGS. 5A and 5B illustrate calculation using modulo arithmetic,

FIGS. 6A and 6B show examples of an arrangement, and

FIG. 7 shows an example of a preferred implementation of a memory.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

FIG. 1 shows the parts of the structure of the cellular system that areessential for the invention. The system comprises a base station 100 anda set of generally mobile subscriber terminals 102 to 106 that have abi-directional connection 108 to 112 to the base station. The basestation switches the connections of the terminals to a base stationcontroller 114 that switches them on to other parts of the system and tothe fixed network. The base station controller 114 controls theoperation of one or more base stations.

With reference to FIG. 2, let us examine an example of the transmitter100 and a receiver 102, to which the solution of the preferredembodiments of the invention can be applied. In the example of thefigure, the transmitter is thus a base station and the receiver asubscriber terminal, but the preferred embodiments can also be appliedwhen the receiver is a base station receiver. The transmitter 100 andreceiver 102 thus communicate over a radio channel 108 in the example ofFIG. 2. The transmitter 100 comprises a data source 200 that can be aspeech coder or some other data source. A signal 202 to be transmittedis obtained from the output of the data source and taken to a channelencoder 204, which in this example is a convolutional encoder. The codedsymbols 206 are taken to a modulator 208, in which the signal ismodulated in a known manner. The modulated signal is taken to radiofrequency parts 210, in which it is amplified and transmitted to theradio path 108 by means of an antenna 212.

On the radio path 108, the signal receives interference and typicallyalso noise. The receiver 102 comprises an antenna 214, with which itreceives the signal that is taken to a demodulator 218 through radiofrequency parts 216. The demodulated signal is taken to a detector 220,in which the signal is decoded, equalized and detected according to thepreferred embodiments of the invention. From the detector, the signal222 is taken on to other parts of the receiver.

Next, an example of using a trellis with a Viterbi decoder is describedin more detail by means of FIG. 3. The figure shows an 8-state trellisdiagram as an example. The trellis diagram is determined on the basis ofthe used code; in the figure, each point has two incoming and twooutgoing routes, i.e. the code in question is a code of a 1/n codingratio. Each column can be called a stage of the trellis. The Viterbialgorithm is solved in a trellis diagram by progressing in stages fromleft to right or right to left. Each point can be reached via twodifferent routes, and the better of the incoming routes is selected ineach point and stored in memory. The selection is based on the metricsmentioned earlier. Path metrics represent the probability of the set ofsymbols in the received signal leading to the state described by thenode in question. Branch metrics, in turn, represent the probabilitiesof different transitions. The metrics of the incoming routes are thuscalculated at each point in such a manner that the branch metric of thetransition between the previous node and the node being processed isadded to the path metric of the previous node on the route. Depending onthe method, either the higher or the smaller of these is selected forcontinuation.

In the conventional Viterbi algorithm, all paths and nodes are checked.When using the M algorithm, only M paths are selected for continuationat each stage. If M equals the number of all states, then this is aplain Viterbi algorithm. The M algorithm is known per se to a personskilled in the art and is not described in more detail herein. Referenceis made to publication Schlegel: Trellis coding, IEEE Press, ISBN:0-7803-1052-7, pages 153 to 189.

Let us examine an example of an embodiment for calculating a trellis bymeans of the flow charts of FIGS. 4A and 4B. All calculation isperformed using modulo arithmetic. At the initialisation stage, pathmetrics are initialised 400 as in the Viterbi algorithm, i.e. in such amanner that the state index number 0 is given a large path metric (letus mark it by PM_(MAX)) and the other state indexes are given a smallpath metric. Next, the threshold values TH₁, TH₂, . . . , TH_(N) areinitialised 402 in such a manner that the highest threshold value TH₁equals PM_(MAX)+C₁ MOD 2D, wherein D is the biggest possible differencebetween any two path metrics. Modulo arithmetic is described in moredetail later on. The next threshold value TH₂ equals PM_(MAX)+C₂ MOD 2Dand so on. The constants C₁ can be negative and C₁>C₂>C₃ . . . >C_(N).Next the set of the surviving state indexes is initialised 404 in such amanner that at least the state index 0 is included. The survivors referto the state indexes that are included in the next stage.

When calculating each stage of the trellis, first the new path metricsare calculated 406, as in the M and Viterbi algorithms, for the newtransitions of the state indexes selected for continuation from theprevious stage. A suitable group is determined 408 for each new pathmetric according to its value by comparing the calculated value with thethreshold values. This can be done for instance by finding the highestthreshold value that is smaller than the calculated path metric. Theindex of the threshold value determines the suitable group. Thus, thestate indexes whose path metrics are larger than TH₁ are placed in group1, the state indexes whose path metric values are between TH₁ and TH₂are placed in group 2, and so on. The highest path metric value is found410 and marked by PM_(MAX). The difference between the new PM_(MAX) andthe previous PM_(MAX) is calculated and the value is marked by d.

Next, the threshold values TH_(i) are updated 412 for instance asfollows: THi=(THi+d) mod 2D, wherein D is the biggest possibledifference between any two path metrics.

Next, the M state indexes to continue to the next stage are selected414. The selection is started from group 1 that comprises the largestpath metrics, i.e. the group to which the state indexes higher than thethreshold value TH₁ were placed. The state indexes in this group areselected for continuation in a random order. Next the state indexes ofgroup 2 are selected in a random order. This is continued one group at atime until M state indexes have been selected.

Let us take a numerical example to clarify the selection forcontinuation. The numerical values are herein selected randomly toillustrate the example. Let us assume that group 1 has 10 state indexes,group 2 has 25 state indexes, group 3 has 23 state indexes, group 4 has58 state indexes and group 5 has 13 state indexes. There may also bemore groups than mentioned here. Let us further assume that M=128, i.e.128 state indexes are selected for continuation for the calculation ofthe next stage. All state indexes from groups 1, 2, 3 and 4 are thenselected for continuation in a random order within each group. This way,116 indexes are selected. Next, 12 state indexes are selected forcontinuation in a random order from group 5 to achieve the desired totalnumber of 128.

Let us next examine FIG. 5A that illustrates calculation done usingmodulo arithmetic. The figure shows a modulo circle having the value 0at the top 500 when moving towards the right, the value D at the bottom502 and the value 2D at the top 500 when coming from the left. Thus, thegreatest distance between two points on the circumference of the circlecan be D. With modulo arithmetic, all path metrics calculated for thestate indexes can be placed on this circumference. FIG. 5A illustratesan example on how the path metrics are placed on the circumference attime instant n, as well as the use of the threshold values. The figureshows six threshold values TH₁, TH₂, . . . , TH₆. Further, a set ofcalculated path metrics are marked by black dots in the figure, of whichthe metrics 508 are larger than the highest threshold value TH₁, andthus belong to the first group. The path metrics 510 belong to the nextgroup. The state indexes selected for continuation are thus selectedstarting from the first group 508 in a random order within each group.In a preferred embodiment, the difference d between the largest pathmetric 504 and the second largest path metric 506 is defined, and forthe next stage, the threshold values TH₁, TH₂, . . . , TH₆ are movedclockwise on the circumference to the extent of said distance. This isillustrated in FIG. 5B that shows the placement of the threshold valuesand path metrics on the circumference at time instant n+1. This isrepeated until the trellis has been searched.

FIG. 6A shows a possible arrangement of an embodiment. The arrangementcomprises means 600 for calculating the path metrics of state indexes.The earlier path metrics 602 and the branch metrics 604 from theprevious stages of the trellis to the points of the stage beingcalculated are used as input. The calculated path metrics 606 of thestate indexes are taken to means 608, in which the path metrics arearranged in groups by comparing them with threshold values. Information610 on the group of each state index is taken to memory means 612, as isinformation 606 on the calculated path metrics. The largest calculatedpath metric is stored in memory 614. Control means 616 control theoperation of the arrangement and determine the state indexes to continueas described above. The control means also update the threshold valuesas described above. The means required by the embodiment can preferablybe implemented by program in a processor, or as separate components oras an ASIC circuit.

A second embodiment uses fixed threshold values that are stored in a ROM(read-only memory) memory, for instance. This way, when calculating thedifferent stages, the actual threshold values need not be recalculated,but suitable limits are selected for the new groups from the existingthreshold values. This embodiment is faster than the one describedearlier, because no time is needed for calculating the threshold values.It is easy to store several threshold values in the ROM memory, becausethe storing density of ROMs is quite high.

This embodiment is illustrated by means of FIG. 5A. Let us assume thatwhen calculating a specific trellis stage, the threshold values aredefined in such a manner that the best group is the range from TH2 toTH3, the second best is from TH3 to TH4 and the third best is from TH4to TH5. When calculating the next stage, the groups can be “shifted”forward on the circle in such a manner that the best group is the rangefrom TH1 to TH2, the second best from TH2 to TH3, and so on. The actualthreshold values TH1, TH2, . . . , TH5 are stored in the memory.

FIG. 6B shows a possible arrangement of a second embodiment. Thearrangement comprises means 600 for calculating the path metrics ofstate indexes. The earlier path metrics 602 and the branch metrics 604from the previous stages of the trellis to the points of the stage beingcalculated are used as input. Information on the calculated metrics istaken to a comparator 620, in which the calculated metric is comparedwith information 622 obtained from memory 614 on the largest calculatedmetric thus far. If the new metric is larger than the earlier, thememory 614 is instructed to store 624 the metric 626 in question.

The calculated metric is taken on to a control unit 616. The controlunit 616 checks the threshold value limits from a threshold value memory628. The threshold value memory stores the limits of the used groups.The control unit can for instance send information on the value of thecalculated metric to the memory 628 which then returns information 632on the group to which the calculated metric belongs. After this, thecontrol unit checks 634 from a maintenance memory 636, in which memoryelement the metric can be stored. Next, the control unit 616 stores 638the metric in the location in question in a metrics memory 640. Themaintenance memory 636 is updated with the location in question.

The maintenance memory 636 is a memory element that keeps a record onwhat is stored in which memory location of the metrics memory 640. Themaintenance memory thus lists the locations of different groups in themetric memory. The metrics memory 640 is processed dynamically in thesense that the metric belonging to a better group can be stored in amemory location storing the metric of a poor group.

When moving on to calculate the next trellis stage, the control unit 616selects suitable limits from the existing threshold values for the newgroups in the threshold value memory 628.

When calculating the stage of the trellis, M first calculated values arewritten directly into the metrics memory 640, and the information on thememory locations of the metrics memory are updated into the maintenancememory 636. When the next metrics are calculated, values belonging to apoorer group are replaced by values belonging to better groups in themetrics memory. This alternative provides the advantage that the size ofthe metrics memory can be limited to be M memory locations, and inaddition, a small maintenance memory is needed.

In this embodiment, the maximum and minimum values of the metrics areobtained when calculating the metrics of the stage. The range betweenthese values varies depending on channel conditions, and the metrics areselected for continuation in proportion to this range.

One embodiment keeps a record of both the maximum and the minimum valueof the metric. It is then possible to monitor the range between thesevalues. If all values are close to each other, the threshold values canbe changed on the basis of this information. Thus, it is possible toavoid a situation in which all metrics accumulate in one group.

FIG. 7 illustrates one embodiment for implementing the memory 612. FIG.7 shows the memory 612, in which each horizontal line is one memorylocation for storing the information on one state index. The left column700 shows the address of the memory location. The address field of thememory location is divided into two sections, the first section 702 andthe second section 704. The first section 702 of the address indicatesthe state index group directly. Thus, in the example of FIG. 7, if theaddress begins with bits “111 . . . ” it refers to the first group 706,into which it is possible to store the state indexes of the largest pathmetric. Correspondingly, if the address begins with bits “000 . . . ”,it refers to the last group 708. The second section 704 of the memorylocation refers to the location of the memory location inside the group.When calculating the path metrics of the state indexes, the stateindexes can be directly stored in the same area of memory as the stateindexes of the same group. The order of the state indexes inside thegroup bears no significance. This address arrangement of the memoryallows an advantageous selection of M state indexes for continuation.When selecting the state indexes for continuation, the routine reads thememory starting from the used memory locations of the first group fromthe bottom towards the first element (1110000 in the example of thefigure) of the group, and then moves to the next group, skipping theempty memory locations. When a desired number of state indexes have beenread, the routine is ended.

Even though the invention has been explained in the above with referenceto examples in accordance with the accompanying drawings, it is apparentthat the invention is not restricted to them but can be modified in manyways within the scope of the attached claims.

1. A method for enhancing a search through a trellis, in which at eachstage of the trellis a certain set of state indexes of the stage areselected for continuation, the method comprising, at each stage of thetrellis: defining more than one unequal threshold value for the valuesof the state indexes, each threshold value defining one state indexgroup, calculating for each state index a path metric, arranging thecalculated state indexes into different state index groups by comparingthe path metric value of the state index with the threshold values, andselecting state indexes for continuation from the groups in such amanner that starting from the group comprising the highest stateindexes, state indexes are selected from the group in a random orderuntil all indexes of the group have been selected, then continuing toselect the state indexes from the next group, and repeating this until acertain number of state indexes have been selected.
 2. A method asclaimed in claim 1, wherein at least part of the calculation is doneusing modulo arithmetic.
 3. A method as claimed in claim 1, furthercomprising arranging the calculated state indexes into different stateindex groups by finding the highest threshold value that is smaller thanthe calculated path metric.
 4. A method as claimed in claim 1, whereinwhen calculating each stage, the used threshold values are selected fromspecific preset threshold values.
 5. A method as claimed in claim 1,wherein the threshold values are defined by adding to the correspondingthreshold value used in calculating the previous stage the differencebetween the largest calculated path metrics of the two previous stages.6. A method as claimed in claim 1, wherein the selection of thethreshold values is done on the basis of the state index values.
 7. Amethod as claimed in claim 1, further comprising: placing the calculatedstate indexes in a state index group by comparing the value of the stateindex path metric with the threshold values, checking whether there arestate indexes that belong to a poorer group among the stored stateindexes and if there are, storing the calculated state index path metricon top of the state index value belonging to a poorer group, and storingthe address of the memory location.
 8. A method as claimed in claim 1,further comprising defining the maximum and minimum values of themetric.
 9. A method as claimed in claim 8, further comprising using themaximum value of the metric in defining the threshold values.
 10. Anarrangement for enhancing a search through a trellis in a detector thatis arranged at each stage of the trellis to select a certain set ofstate indexes of the stage for continuation, wherein the detector isarranged, when each stage of the trellis is calculated, to define morethan one unequal threshold value for the values of the state indexes,each threshold value defining one state index group, to calculate foreach state index a path metric, to arrange the calculated state indexesinto different groups by comparing the path metric value of the stateindex with the threshold values, and to select from the groups a certainnumber of state indexes for continuation in such a manner that startingfrom the group comprising the highest state indexes, entire groups areselected for continuation until the next entire group does not fit in,and from this group only randomly selected state indexes are selecteduntil a given number is collected.
 11. An arrangement as claimed inclaim 10, wherein the detector is arranged to perform at least part ofthe calculation by using modulo arithmetic.
 12. An arrangement asclaimed in claim 10, wherein the detector comprises: means forcalculating the path metrics for different state indexes, memory forstoring the path metrics of the state indexes, and memory for storingthe threshold values.
 13. An arrangement as claimed in claim 10, whereinthe detector comprises: memory for storing the highest path metricvalue, and means for defining a threshold value by adding to thecorresponding threshold value used in calculating the previous stage thedifference between the largest calculated path metrics of the twoprevious stages.
 14. An arrangement as claimed in claim 10, wherein thedetector comprises memory, into which a set of threshold values arestored in advance, and means arranged to select the threshold valuesused, when each stage is calculated, from the preset threshold values.15. An arrangement as claimed in claim 10, wherein the detector isarranged to select the threshold values on the basis of the values ofthe state indexes.
 16. An arrangement as claimed in claim 10, whereinthe detector comprises: means for calculating path metrics for differentstate indexes, memory for storing the path metrics of the state indexes,memory for storing the addresses of the memory locations of the stateindexes, and memory for storing the threshold values.